/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Gatoper
 */
@Entity
public class Appointment implements Serializable {

    public Appointment(Date date, Integer charge, String notes, Medicalrecord medicalrecord, Veterinarian veterinarian, Long id) {
        this.date = date;
        this.charge = charge;
        this.notes = notes;
        this.medicalrecord = medicalrecord;
        this.veterinarian = veterinarian;
        this.id = id;
    }
    @Column(name = "date")
    @Temporal(TemporalType.DATE)
    private Date date;
    @Column(name = "charge")
    private Integer charge;
    @Column(name = "notes")
    private String notes;
    @ManyToOne
    private Medicalrecord medicalrecord;
    @ManyToOne(cascade= CascadeType.PERSIST)
    private Veterinarian veterinarian;
    @Id
    private Long id;

    public Medicalrecord getMedicalrecord() {
        return medicalrecord;
    }

    public void setMedicalrecord(Medicalrecord medicalrecord) {
        this.medicalrecord = medicalrecord;
    }

    public Veterinarian getVeterinarian() {
        return veterinarian;
    }

    public void setVeterinarian(Veterinarian veterinarian) {
        this.veterinarian = veterinarian;
    }
    public Appointment() {
        super();
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getCharge() {
        return charge;
    }

    public void setCharge(Integer charge) {
        this.charge = charge;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

      
}
